package golf.stockinfo.buysellsimulation.util;

import golf.stockinfo.buysellsimulation.GlobalCache;

import java.sql.Date;

public class DateUtil {
	
	public static final Date FIRST_OF_2007 = Date.valueOf("2007-01-01");
	
	public static final Date ZERO_DATE = Date.valueOf("0001-01-01");
	
	public static String getDateString(Date dt){
		
		String output = (String) GlobalCache.getCache("DateUtil.getDateString" + dt.getTime());
		
		if(output == null){
			output = dt.toString();
			GlobalCache.addCache(dt.getTime(), output);
		}
		return output;
	}

}
